git clone --recursive --depth=1 https://github.com/barry-ran/QtScrcpy 

cd QtScrcpy

sed -i 's/Qt6//g' QtScrcpy/CMakeLists.txt

mkdir cmake
wget -P cmake \
    https://gitee.com/zinface/spark.framework/raw/master/cmake/SparkWithGit.cmake

git checkout CMakeLists.txt

cat >> CMakeLists.txt <<EOF
include(cmake/SparkWithGit.cmake)
spark_initialize_modules()

spark_framework_include_with_git(QtScrcpy
    https://gitee.com/spark-buildx/spakr-framework-buildx.git
    FEATURES pkg_qscrcpy)
EOF

mkdir build
cmake -S. -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -- -j8
cmake --build build --target package

xdg-open build
